package com.tywh.controller;

import com.tywh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import org.springframework.web.bind.annotation.ResponseBody;


/**
 * @author xhx
 * @date 2018年4月19日 下午3:20:19
 */
@Controller
public class UserController {
	
	@Autowired
	private UserService userService;

	@ResponseBody
	@RequestMapping(value = "/getUser" , method=RequestMethod.GET)
	public String getUser(int userId){
		String jsonStr = userService.getUser(userId);
		return jsonStr;
	}

}
